Skip to content

test: replace no-op and duplicate tests with checks that assert - #44

Merged
vite-hub[bot] merged 1 commit into
mainfrom
test/smart-test-audit
Nov 1, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
test/smart-test-audit

Conversation

@onmax

@onmax onmax commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Test audit following OpenClaw's test-audit rules: each test should guard a behavior that a credible regression would break, and no other test should already cover it.

Removed or replaced

  • Five build tests on main were no-ops (0ms each). They called setup() from @nuxt/test-utils inside it(), which only registers beforeAll hooks, so nothing was built and expect(true).toBe(true) always passed.
    • env-var-validation: build validation does not see NUXT_* overrides from the shell or .env (checked by building with a minLength(1) schema). The test only "passed" because Valibot's string() accepts ''. Deleted.
    • zod-native: validateAtRuntime: true turns build validation off, and the build repeats runtime-invalid. Deleted.
    • validation-success (Valibot): the Nuxt build-validation success path is already covered by cloudflare-auto-import. Deleted.
    • arktype: replaced by a unit test of validateRuntimeConfig with a callable ArkType schema.
    • no-config: now runs nuxi prepare, which is enough to prove the module sets up without a schema.
  • valibot-runtime fixture: no test used it.
  • Four template tests (Zod/Valibot × shape/validates) are merged into one table test that checks the draft and real validation. The tests that grepped the generated template for coercionSchema were dropped; the runtime e2e tests cover that behavior.
  • server-typing no longer runs a redundant setup() before nuxi prepare.
  • json-schema.test.ts: dropped "Valibot has no native JSON Schema". It asserted a third-party library detail; the Valibot fallback output test stays.
  • agent-context.test.ts → well-known-skill.test.ts: only the check that the compatibility SKILL.md matches the canonical one is kept. The copied package.json URLs and index.json literal are gone.
  • Renamed a misnamed onError: 'ignore' test. Moved the duplicated waitForResponse helper to test/utils/server.ts. Dropped the now-unused @nuxt/test-utils.

Result

main this PR
Tests 255 (5 no-ops) 247
pnpm test (warm, local) 8.7s 9.1s
Test LOC +64 −367

The runtime stays about the same, but every remaining test now asserts something.

pnpm test, pnpm typecheck and eslint test pass locally.

🤖 Generated with Claude Code

Five build tests called @nuxt/test-utils setup() inside it(), which only
registers hooks, so they never built anything. Build validation does not
see NUXT_* overrides, and zod-native turned build validation off, so
those cases had no contract left. The Nuxt build-validation success path
stays covered by cloudflare-auto-import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nuxt-safe-runtime-config Ready Ready Preview Nov 1, 2026 9:36am UTC

@vite-hub

vite-hub Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Waiting 2026-11-01T09:41:55.837Z 2m 7s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 01038e87-1415-4b52-8d8c-07bb4e8de6e7.

View session

Ready; no actionable findings in the diff, Pullfrog review, or Codex review. All supplied checks pass. Locally, git diff --check, Node syntax checks for eight changed files, and helper/skill smoke checks passed. Vitest, lint, and typecheck were unavailable because the host rejected unchanged minimumReleaseAgeExcludePrune configuration; hosted CI covers them. No repair commit was needed.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T09:35:37.124509Z d9b6612 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt-safe-runtime-config@44

commit: d9b6612

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes across the test audit, including removed fixtures and dependencies, consolidated validation coverage, the ArkType callable-schema test, shared server readiness helper, and narrowed well-known skill assertion.

  • No-op build tests removed — late @nuxt/test-utils setup calls and tautological assertions are replaced by direct nuxi execution where setup behavior still matters.
  • Validation coverage consolidated — Zod and Valibot JSON Schema outputs are checked against their drafts with both valid and invalid configs, while transformation and coercion behavior remains covered end to end.
  • ArkType coverage focused — callable Standard Schema compatibility is exercised directly through validateRuntimeConfig without maintaining a redundant Nuxt fixture.
  • Test infrastructure simplified — duplicated server polling moved to one helper, unused fixtures and @nuxt/test-utils were removed, and compatibility skill content equality remains asserted.

Verification passed: 19 targeted changed/related tests, pnpm typecheck, and ESLint on the changed test files.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit 0fc3b7d into main Nov 1, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 1, 2026
@onmax
onmax deleted the test/smart-test-audit branch November 1, 2026 11:04

This branch was successfully deployed

1 active deployment
Preview — d9b66127 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant